/************************************************************
wx
2020/1/18
主角
*************************************************************/

using System.Collections.Generic;
using Fight;

public class MainCharacter : Character
{
    //主角做成单例
    public static MainCharacter Instance
    {
        get
        {
            if (m_mainCharacter == null)
            {
                m_mainCharacter = new MainCharacter();
                var config = ConfigManager.Instance.GetMainChaConfig(1);
                m_mainCharacter.Attack = config.Atk;
                m_mainCharacter.Defend = config.Def;
                m_mainCharacter.Hp = config.HpMax;
                m_mainCharacter.HpMax = config.HpMax;
                m_mainCharacter.Mp = config.MpMax;
                m_mainCharacter.MpMax = config.MpMax;
                m_mainCharacter.Level = 1;
                m_mainCharacter.Name = "爱丽丝";
                m_mainCharacter.Type = CharacterType.MainCharacter;
            }

            return m_mainCharacter;
        }
    }

    private static MainCharacter m_mainCharacter;
    private MainCharacter()
    {
        ListCards = new List<Card>();
        MessageManager.Instance.RegistEvent<Card>(MessageType.SelectCard, OnSelectCard);
    }

    

}
